package com.devunion.reader.client.service;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.core.client.GWT;
import com.devunion.reader.client.to.UserManagementTo;
import com.extjs.gxt.ui.client.data.ListLoadResult;

import java.util.List;

/**
 * @author Timoshenko Alexander 19.08.2009 : 14:39:36
 */
public interface UserService extends RemoteService {
    public static class App {
        private static final UserServiceAsync ourInstance;

        static {
            ourInstance = (UserServiceAsync) GWT.create(UserService.class);
            ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "UserService.rpc");
        }

        public static UserServiceAsync getInstance() {
            return ourInstance;
        }
    }

    ListLoadResult<UserManagementTo> getUsers();
}
